package com.aistar.order.mapper;

import com.aistar.order.entity.OrderBill;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * Created by Administrator on 2019/6/24 0024.
 */
public interface OrderBillMapper {

    @Select("select * from order_bill where order_id like concat('%',#{order_id},'%')")
    List<OrderBill> findAll(String orderId);

    @Select("select * from order_bill where order_id=#{Id}")
    OrderBill findById(String Id);

    @Insert("insert into order_bill values(#{id},#{type},#{info},#{email},#{orderId})")
    void save(OrderBill orderBill);

    @Delete("delete from order_bill where id=#{id}")
    void delete(String id);

    @Update("update order_bill set id=#{id},type=#{type},info=#{info} ,email=#{email} ,order_id=#{orderId} where id=#{id}")
    void update(OrderBill orderBill);

}
